/***************************************************************************
 * *   File name: Client.cpp
 * *    Describe: Cient的相关实现
 * *  Created on: 2016-8-6
 * *      Author: dengxiudong
 * ************************************************************************/ 
#ifndef _CLIENT_H_
#define _CLIENT_H_


#include "Protocol.h"

#include <loong/TcpConn.h>

#include <stdio.h>
#include <stdlib.h>

#include <functional>
#include <sstream>
#include <memory>
#include <atomic>


class Client
{
public:
	Client(std::shared_ptr<loong::TcpConn> conn);
	~Client(void) {}
public:
	void handleMsg(loong::Buffer * buf);
	bool sendMsg(Msg *msg);
	
public:
	void setClientId(uint32_t clientId);
	uint32_t getClientId();

private:
	std::shared_ptr<loong::TcpConn> m_conn;

	uint32_t m_clientId;
	std::string m_clientIP;
};





#endif
